-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(serde_at): deserialize _ #216
fix(serde_at): deserialize _ #216
Conversation
This looks good to me 👍 Sorry for the long response time. Would you mind rebasing this? Thank you for the contribution! |
e3b191f
to
000bf7d
Compare
Done :) |
Seems like tests are failing, and |
I can't understand the real reason why the test that is now passing should have been invalid in the first place. https://github.com/FactbirdHQ/atat/blob/master/atat/src/blocking/client.rs#L426-L448 The returned value (after this PR) is now: Ok(TestResponseString { socket: 22, length: 16, data: "22" }) instead of being a parsing error. Can you please help me understand if this test should really fail? I don't see why the test was created... |
That is a very valid point! It does look wrong to me aswell! As does this test though: atat/atat/src/blocking/client.rs Lines 375 to 424 in c31f700
Response arguments are fixed positions, and cannot just be anywhere in the response? I have not used the blocking client even once since we introduced the async one, so i guess these test cases must have slipped by my review a long time ago :/ |
Should I remove this test then? |
Yeah, lets go ahead and do that 👍 |
Thanks! |
While parsing the CGMI of my device (SIM7020), I've noticed that I was getting a lot of parsing errors.
After digging deeper, I've discovered that the parsing errors were actually
EofWhileParsingString
errors.Finally, I've discovered why: my manufacturer string looked like this:
And this was breaking at the
_
, because it's not considered alphanumeric.My fix here is to allow all ASCII characters >= 32 (space + printable characters).
The only non-printable character included is
DEL
(127) - but it shouldn't be a big deal.Before my fix:
After my fix: